package com.wanmait.heatingrepair.webController;

import com.wanmait.heatingrepair.pojo.Userinfo;
import com.wanmait.heatingrepair.service.impl.UserinfoService;
import com.wanmait.heatingrepair.util.IPUtils;
import com.wanmait.heatingrepair.util.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/*
用户
郭振鹏建
 */
@RestController
@RequestMapping("web")
public class UserinfoController
{
    @Resource
    private UserinfoService userinfoService;
    @RequestMapping("login")
    public void login(@RequestBody Userinfo userinfo, HttpServletRequest request){
        String ip= IPUtils.getIpAddr(request);

    }
    private Userinfo test(){
        Userinfo usernfo=new Userinfo();
        System.out.println("234");
        System.out.println("1234");
        return usernfo;
    }

    @RequestMapping("exit")
    public Result exit(){
        return null;
    }

}
